<template>
  <div class="login-panel">
    <h1 class="title">后台管理系统</h1>
    <el-tabs type="border-card" stretch>
      <el-tab-pane>
        <template #label>
          <span class="custom-tabs-label">
            <el-icon><UserFilled /></el-icon>
            <span>账号登录</span>
          </span>
        </template>
        <login-accout ref="accoutRef" />
      </el-tab-pane>
      <el-tab-pane>
        <template #label>
          <span class="custom-tabs-label">
            <el-icon><Lock /></el-icon>
            <span>密码登录</span>
          </span>
        </template>
        <!--<login-accout />-->
      </el-tab-pane>

      <el-button type="primary" @click="onSubmit" class="login">登录</el-button>
    </el-tabs>
  </div>
</template>

<script>
import LoginAccout from "./LoginAccout.vue";
import { ref } from "vue";
export default {
  components: { LoginAccout },
  setup() {
    const accoutRef = ref();

    const onSubmit = () => {
      accoutRef.value.loginAction();
    };

    return {
      accoutRef,
      onSubmit,
    };
  },
};
</script>

<style lang="less" scoped>
.login-panel {
  width: 300px;
  margin-bottom: 140px;
  .title {
    text-align: center;
  }

  .login {
    width: 100%;
  }
}
</style>
